class CreateInvitations < ActiveRecord::Migration
  def self.up
    create_table :invitations do |t|
      t.integer :group_id
      t.string :email
      t.string :key, :limit => 40
      t.userstamps
      t.timestamps
    end 
    
    add_index "invitations", ["group_id", "email"], :name => "index_invitations_on_group_id_and_email", :unique => true
    
  end 

  def self.down
    drop_table :invitations
  end
end
